#include "kernel.h"

time_manage_t kernal_time;//  1Mhz  IICͨ ţ    ĺ       2.5   룬    ʱ 䲻    1    


void kernal()
{
	kernal_time.start_time = HAL_GetTick();
	kernal_time.timer_dur = kernal_time.start_time - kernal_time.last_start_time;
	
	//CDC_Transmit_FS((uint8_t *)"Hello\r", 6);
	
	kernal_time.end_time = HAL_GetTick();
	kernal_time.dur_time = kernal_time.end_time - kernal_time.start_time;
	kernal_time.last_start_time = kernal_time.start_time;
}

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)//  ʱ   жϺ   
{
	if(htim == &htim3)//  ʱ   ж 15   1hz
	{
		LED_R_CHANGE;
	}
	if(htim == &htim4)//  ʱ   ж 16   100hz
	{
		kernal();
	}
}

